package HeuNavigation;


import java.util.Scanner;

public class Interface {
    public static void run(){
        try {
            int key=0;
            System.out.println("哈尔滨工程大学地图导航");
            System.out.println("请输入序号选择相应的功能");
            System.out.println("1:显示地图");
            System.out.println("2:显示所有地点信息");
            System.out.println("3:获取附近地点");
            System.out.println("4:出行导航");
            System.out.println("5:按场合查询");
            System.out.println("6:地点距离排序");
            System.out.println("7:查询距离目的地距离第N小的位置");
            System.out.println("8:相对人流量更新查询");
            HeuMap.init();
            while (true){
                Scanner s=new Scanner(System.in);
                key=s.nextInt();
                if (key==-1)
                    break;
                else {
                    switch (key){
                        case 1:HeuMap.show_map();
                            break;
                        case 2:HeuMap.show_list();
                            break;
                        case 3:HeuMap.getNearBy();
                            break;
                        case 4:HeuMap.shortest_path();
                            break;
                        case 5:HeuMap.selectByType();
                            break;
                        case 6:HeuMap.dis_sort();
                            break;
                        case 7:HeuMap.select_fixedDis();
                            break;
                        case 8:HeuMap.select_peopleNum();
                            break;
                    }

                }

            }
            System.out.println("导航系统结束！");
        }catch (Exception e){
            System.out.println("系统出错！");
            System.out.println(e.getMessage());
        }

    }
    public static void main(String[] args) {
        run();
    }
}
